<form id="pagerForm" method="post" action="<?php echo __URL__; ?>">
    <input type="hidden" name="option" value="<?php echo $this->input->get_post('option'); ?>">
    <input type="hidden" name="user" value="<?php echo $this->input->get_post('user'); ?>"/>
    <input type="hidden" name="create_time" value="<?php echo $this->input->get_post('create_time'); ?>"/>

    <input type="hidden" name="pageNum" value="<?php echo $this->input->get_post('pageNum'); ?>"/><!--【必须】value=1可以写死-->
    <input type="hidden" name="numPerPage" value="<?php echo $this->input->get_post('numPerPage'); ?>"/><!--【可选】每页显示多少条-->
    <input type="hidden" name="orderField" value="<?php echo $this->input->get_post('orderField'); ?>"/><!--【可选】查询排序-->
    <input type="hidden" name="orderDirection" value="<?php echo $this->input->get_post('orderDirection'); ?>"/><!--【可选】升序降序-->
</form>
<div class="pageHeader">
    <form onsubmit="return navTabSearch(this);" action="<?php echo __URL__; ?>" method="post">
        <div class="searchBar">
            <table class="searchContent">
              <tr>
                <td>搜索模块：
				<select name="option">
					<option></option>
					<?php 							
					foreach($option as $v1):
						if($this->input->get_post('option') == $v1[modules]){	
							echo "<option value='$v1[modules]' selected>$v1[title]</option>";
						}else{
							echo "<option value='$v1[modules]'>$v1[title]</option>";
						}
						foreach($v1['son'] as $v2):
							if($this->input->get_post('option') == $v2['modules'].'|'.$v2['controller']){	
								echo "<option value='$v2[modules]|$v2[controller]' selected>&nbsp;&nbsp;|-$v2[title]</option>";
							}else{
								echo "<option value='$v2[modules]|$v2[controller]'>&nbsp;&nbsp;|-$v2[title]</option>";
							}								
							foreach($v2['son'] as $v3):
								if($this->input->get_post('option') == $v3[modules].'|'.$v3[controller].'|'.$v3[method]){	
									echo "<option value='$v3[modules]|$v3[controller]|$v3[method]'  selected>&nbsp;&nbsp;&nbsp;&nbsp;|-$v3[title]</option>";
								}else{
									echo "<option value='$v3[modules]|$v3[controller]|$v3[method]'>&nbsp;&nbsp;&nbsp;&nbsp;|-$v3[title]</option>";
								}		
							endforeach;	
						endforeach;	
					endforeach;	
					?>	
					</select>	 
                    </td>
                    <td>
                        操作人员：<input type="text" name="user" value="<?php echo $this->input->get_post('user'); ?>"/>
                    </td>                    
                    <td>
                        日期：<input type="text" name="create_time" class="date" readonly="true"
                                    value="<?php echo $this->input->get_post('create_time'); ?>"/>
                    </td>
                </tr>
            </table>
            <div class="subBar">
                <ul>
                    <li>
                        <div class="buttonActive">
                            <div class="buttonContent">
                                <button type="submit">检索</button>
                            </div>
                        </div>
                    </li>
                </ul>
            </div>
        </div>
    </form>
</div>
<div class="pageContent">
    <div class="panelBar">
        <ul class="toolBar">
            <li>
			<a class="delete" href="<?php echo __URL__ . '/reset_log'; ?>" target="ajaxTodo" title="确定要清空日志吗?"><span>清空日志</span></a>
			</li>				   
        </ul>
    </div>
    <table class="list" width="100%" layoutH="115">
        <thead>
        <tr>
            <th width="83"
                class="<?php if ('id' == $this->input->get_post('orderField')) echo $this->input->get_post('orderDirection'); ?>"
                orderfield="id">id            </th>              
            <th width="169"
                class="<?php if ('modules' == $this->input->get_post('orderField')) echo $this->input->get_post('orderDirection'); ?>"
                orderfield="modules">插件</th>
            <th width="181"
                class="<?php if ('controller' == $this->input->get_post('orderField')) echo $this->input->get_post('orderDirection'); ?>"
                orderfield="controller">模块</th>
            <th width="216"
                class="<?php if ('method' == $this->input->get_post('orderField')) echo $this->input->get_post('orderDirection'); ?>"
                orderfield="method">操作</th>
            <th width="136">操作人员 </th>		
            <th width="296">日期</th>
        </tr>
        </thead>
        <tbody id="box">
        <?php foreach ($list as $v): ?>
            <tr target="id" rel="<?php echo $v['id'] ?>">
                <td><?php echo $v['id']; ?></td>
                <td><?php echo @$node[$v['modules']]['title']; ?></td>
                <td><?php echo @$node[$v['modules'].$v['controller']]['title'];?></span></td>
                <td><?php echo @$node[$v['modules'].$v['controller'].$v['method']]['title'];?></td>
                <td><?php echo $v['user']; ?></td>
                <td><?php echo date('Y-m-d H:i:s',$v['create_time']);?></td>
            </tr>
        <?php endforeach; ?>        </tbody>
    </table>

    <div class="panelBar">
        <div class="pages">
            <span>显示</span>
            <?php
            $options = array("20" => "20", "50" => "50", "100" => "100", "200" => "200",);
            echo form_dropdown("numPerPage", $options, $this->input->get_post("numPerPage"), "class=\"combox\" onchange=\"navTabPageBreak({numPerPage:this.value})\"");
            ?>            <span>条，共<?php echo intval($this->input->get_post("totalCount")); ?>条</span>
        </div>

        <div class="pagination" targetType="navTab"
             totalCount="<?php echo intval($this->input->get_post("totalCount")); ?>"
             numPerPage="<?php echo intval($this->input->get_post("numPerPage")); ?>" pageNumShown="10"
             currentPage="<?php echo intval($this->input->get_post("pageNum")); ?>"></div>
    </div>
</div>
<script language="javascript">
/**
 ** 清空日志回调操作
 */
function callback_handle(json)
{
	if (json.statusCode == DWZ.statusCode.ok)
	{
		var stringObj = json.message;   
		var newstr = stringObj.replace("<p>操作成功!</p>","");	
		if(newstr == '操作成功'){
			$("#box").remove();
		}
	}
}
</script>